package com.woniu.humanresource.exceptionhandler;


import com.woniu.humanresource.entity.ResponseText;
import com.woniu.humanresource.exception.GeneralException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler(GeneralException.class)
    public ResponseText catchGeneralExceptions(){
        return new ResponseText(null,500,"程序开小差了...");
    }
}
